namespace PickGold.Charting.Design
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Drawing.Design;

    internal class ColorExtendedEditor : UITypeEditor
    {
        public override bool GetPaintValueSupported(ITypeDescriptorContext context)
        {
            return true;
        }

        public override void PaintValue(PaintValueEventArgs e)
        {
            ColorExtended extended = e.Value as ColorExtended;
            if (extended != null)
            {
                e.Graphics.FillRectangle(new SolidBrush(extended.Value), e.Bounds);
            }
        }
    }
}

